<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 
        slice(startIndex,endIndex)
        substr(index,length)
        subString(startIndex,endIndex)
    -->
    <script>
        var arr = "hello"
        console.log(arr.slice(0)); // hello
        console.log(arr.slice(0,3)); // hel
        console.log(arr.substr(0,3)); // hel
        console.log(arr.substring(0,2)); // he
    </script>
</body>
</html>